//-
  Copyright 2014 Treode, Inc.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

doctype 5
html(lang="en", ng-app="movies")
  head
    meta(charset="utf-8")
    link(rel="stylesheet", href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/themes/base/jquery-ui.css")
    link(rel="stylesheet", href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css")
    link(rel="stylesheet", href="//select2.github.com/select2/select2-3.2/select2.css")
    - if (locals.prod)
      link(rel="stylesheet", href="movies.min.css")
    - else
      link(rel="stylesheet", href="movies.css")
    title Movies Navigator
  body
    .navbar.navbar-inverse.navbar-fixed-top
      .navbar-inner
        .container-fluid
          a.brand(href="#") Movies Navigator
          ul.nav(role="navigation")
            li.dropdown
              a#addDrop.dropdown-toggle(href="#", role="button", data-toggle="dropdown")
                | Add
                &nbsp;
                b.caret
              ul.dropdown-menu(role="menu", aria-labelledby="addDrop")
                li
                  a#addMovie(href="#/add-movie") Movie
                li
                  a#addActor(href="#/add-actor") Actor
          span.pull-right
            form.navbar-search(ng-controller="NavbarSearchCtrl", ng-submit="search()")
              input.search-query(type="text", placeholder="Search", ng-model="query")
    .container-fluid
      div(ng-controller="AlertsCtrl")
        .row-fluid(ng-repeat="a in alerts")
          .span2
          alert.span8.fade.in(type="a.type", close="dismiss ($index)")
            div(ng-repeat="m in a.messages")
              {{m}}
      div(ng-view)
    != "<script type='text/javascript'>"
    != "var store = '/db';"
    != "</script>"
    script(src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js")
    script(src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js")
    script(src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/js/bootstrap.min.js")
    script(src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.js")
    script(src="//select2.github.com/select2/select2-3.2/select2.js")
    script(src="nocdn/ui-bootstrap.min.js")
    script(src="nocdn/ui-bootstrap-tpls.min.js")
    script(src="nocdn/angular-ui.min.js")
    script(src="nocdn/treode-angular.js")
    - if (locals.prod)
      script(src="movies.min.js")
    - else
      script(src="movies.js")
      script(src="view/actor.js")
      script(src="view/movie.js")
